// libNTXM - XM Player Library for the Nintendo DS
// Copyright (C) 2005-2007 Tobias Weyand (0xtob)
//                         me@nitrotracker.tobw.net
// 
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// 
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

#include <nds.h>

const u32 linear_freq_table[] = {
137019392, 137081238, 137143112, 137205014, 137266945, 137328903, 137390889, 137452903, 137514945, 137577015, 137639113, 137701239, 137763393, 137825575, 137887786, 137950024, 138012290, 138074585, 138136908, 138199258, 138261637, 138324045, 138386480, 138448943, 138511435, 138573955, 138636503, 138699079, 138761684, 138824316, 138886977, 138949667, 139012384, 139075130, 139137905, 139200707, 139263538, 139326398, 139389285, 139452201, 139515146, 139578119, 139641120, 139704150, 139767208, 139830295, 139893410, 139956553, 140019725, 140082926, 140146155, 140209413, 140272699, 140336014, 140399357, 140462729, 140526130, 140589559, 140653017, 140716504, 140780019, 140843563, 140907135, 140970736, 141034366, 141098025, 141161712, 141225428, 141289173, 141352947, 141416749, 141480580, 141544440, 141608329, 141672247, 141736193, 141800169, 141864173, 141928206, 141992268, 142056359, 142120479, 142184628, 142248806, 142313013, 142377248, 142441513, 142505807, 142570130, 142634482, 142698862, 142763272, 142827711, 142892179, 142956677, 143021203, 143085758, 143150343, 143214957, 143279599, 143344271, 143408973, 143473703, 143538463, 143603252, 143668070, 143732917, 143797794, 143862700, 143927635, 143992600, 144057593, 144122617, 144187669, 144252751, 144317862, 144383003, 144448173, 144513373, 144578602, 144643860, 144709148, 144774465, 144839812, 144905188, 144970594, 145036029, 145101494,
145166989, 145232512, 145298066, 145363649, 145429262, 145494904, 145560576, 145626278, 145692009, 145757770, 145823561, 145889381, 145955231, 146021111, 146087020, 146152959, 146218928, 146284927, 146350956, 146417014, 146483102, 146549220, 146615368, 146681546, 146747753, 146813991, 146880258, 146946556, 147012883, 147079240, 147145627, 147212044, 147278491, 147344968, 147411475, 147478012, 147544579, 147611176, 147677804, 147744461, 147811148, 147877866, 147944613, 148011391, 148078199, 148145037, 148211905, 148278803, 148345732, 148412690, 148479679, 148546699, 148613748, 148680828, 148747938, 148815078, 148882249, 148949450, 149016681, 149083942, 149151234, 149218557, 149285909, 149353292, 149420706, 149488150, 149555624, 149623129, 149690665, 149758230, 149825827, 149893453, 149961111, 150028799, 150096517, 150164266, 150232046, 150299856, 150367697, 150435568, 150503470, 150571403, 150639366, 150707360, 150775385, 150843440, 150911526, 150979643, 151047791, 151115969, 151184178, 151252418, 151320689, 151388991, 151457323, 151525686, 151594080, 151662505, 151730961, 151799448, 151867965, 151936514, 152005093, 152073704, 152142345, 152211018, 152279721, 152348456, 152417221, 152486018, 152554845, 152623704, 152692593, 152761514, 152830466, 152899449, 152968463, 153037509, 153106585, 153175693, 153244832, 153314002, 153383203, 153452435, 153521699, 153590994, 153660320, 153729678,
153799067, 153868487, 153937939, 154007422, 154076936, 154146481, 154216058, 154285667, 154355307, 154424978, 154494681, 154564415, 154634181, 154703978, 154773806, 154843667, 154913558, 154983482, 155053436, 155123423, 155193441, 155263490, 155333572, 155403684, 155473829, 155544005, 155614213, 155684452, 155754724, 155825027, 155895361, 155965728, 156036126, 156106556, 156177018, 156247511, 156318036, 156388594, 156459183, 156529804, 156600456, 156671141, 156741858, 156812606, 156883387, 156954199, 157025043, 157095920, 157166828, 157237768, 157308741, 157379745, 157450781, 157521850, 157592950, 157664083, 157735248, 157806445, 157877674, 157948935, 158020228, 158091554, 158162912, 158234301, 158305724, 158377178, 158448665, 158520183, 158591735, 158663318, 158734934, 158806582, 158878262, 158949975, 159021720, 159093498, 159165308, 159237150, 159309025, 159380932, 159452872, 159524844, 159596849, 159668886, 159740956, 159813058, 159885193, 159957360, 160029560, 160101792, 160174057, 160246355, 160318685, 160391048, 160463444, 160535872, 160608333, 160680827, 160753353, 160825913, 160898505, 160971129, 161043787, 161116477, 161189200, 161261956, 161334745, 161407566, 161480421, 161553308, 161626228, 161699181, 161772168, 161845187, 161918239, 161991324, 162064441, 162137592, 162210776, 162283993, 162357243, 162430527, 162503843, 162577192, 162650574, 162723990, 162797439, 162870920,
162944435, 163017984, 163091565, 163165179, 163238827, 163312508, 163386223, 163459970, 163533751, 163607565, 163681413, 163755293, 163829208, 163903155, 163977136, 164051150, 164125198, 164199279, 164273394, 164347542, 164421723, 164495938, 164570186, 164644468, 164718784, 164793133, 164867516, 164941932, 165016382, 165090865, 165165382, 165239932, 165314517, 165389135, 165463786, 165538472, 165613191, 165687943, 165762730, 165837550, 165912404, 165987292, 166062214, 166137169, 166212158, 166287181, 166362238, 166437329, 166512454, 166587613, 166662805, 166738032, 166813292, 166888587, 166963915, 167039277, 167114674, 167190104, 167265569, 167341067, 167416600, 167492167, 167567768, 167643403, 167719072, 167794775, 167870513, 167946284, 168022090, 168097930, 168173804, 168249713, 168325656, 168401633, 168477644, 168553690, 168629770, 168705884, 168782033, 168858216, 168934433, 169010685, 169086971, 169163292, 169239647, 169316037, 169392461, 169468920, 169545413, 169621940, 169698503, 169775099, 169851731, 169928396, 170005097, 170081832, 170158602, 170235406, 170312245, 170389119, 170466028, 170542971, 170619949, 170696961, 170774009, 170851091, 170928208, 171005360, 171082546, 171159768, 171237024, 171314315, 171391641, 171469002, 171546398, 171623829, 171701295, 171778795, 171856331, 171933902, 172011508, 172089148, 172166824, 172244535, 172322281, 172400062, 172477878, 172555729,
172633616, 172711537, 172789494, 172867486, 172945513, 173023575, 173101673, 173179806, 173257974, 173336177, 173414416, 173492690, 173570999, 173649344, 173727724, 173806139, 173884590, 173963076, 174041598, 174120155, 174198748, 174277376, 174356039, 174434738, 174513473, 174592243, 174671048, 174749889, 174828766, 174907679, 174986627, 175065610, 175144629, 175223684, 175302775, 175381901, 175461063, 175540261, 175619495, 175698764, 175778069, 175857410, 175936787, 176016199, 176095648, 176175132, 176254652, 176334208, 176413800, 176493427, 176573091, 176652791, 176732527, 176812298, 176892106, 176971950, 177051829, 177131745, 177211697, 177291685, 177371709, 177451769, 177531866, 177611998, 177692167, 177772372, 177852613, 177932890, 178013203, 178093553, 178173939, 178254361, 178334820, 178415315, 178495846, 178576414, 178657018, 178737658, 178818335, 178899048, 178979797, 179060584, 179141406, 179222265, 179303160, 179384092, 179465061, 179546066, 179627108, 179708186, 179789301, 179870452, 179951640, 180032865, 180114126, 180195424, 180276759, 180358130, 180439538, 180520983, 180602465, 180683984, 180765539, 180847131, 180928760, 181010425, 181092128, 181173868, 181255644, 181337457, 181419307, 181501194, 181583119, 181665080, 181747078, 181829113, 181911185, 181993294, 182075440, 182157624, 182239844, 182322102, 182404396, 182486728, 182569097, 182651503, 182733946, 182816427,
182898945, 182981500, 183064092, 183146722, 183229388, 183312093, 183394834, 183477613, 183560429, 183643283, 183726174, 183809102, 183892068, 183975071, 184058112, 184141190, 184224306, 184307459, 184390650, 184473878, 184557144, 184640448, 184723789, 184807167, 184890584, 184974038, 185057529, 185141059, 185224626, 185308230, 185391873, 185475553, 185559271, 185643027, 185726821, 185810652, 185894521, 185978428, 186062373, 186146356, 186230377, 186314436, 186398532, 186482667, 186566840, 186651050, 186735299, 186819585, 186903910, 186988273, 187072674, 187157113, 187241590, 187326105, 187410658, 187495249, 187579879, 187664547, 187749253, 187833997, 187918780, 188003601, 188088460, 188173357, 188258293, 188343267, 188428279, 188513330, 188598419, 188683547, 188768713, 188853917, 188939160, 189024442, 189109762, 189195120, 189280517, 189365952, 189451426, 189536939, 189622490, 189708080, 189793708, 189879375, 189965081, 190050826, 190136609, 190222431, 190308291, 190394191, 190480129, 190566106, 190652121, 190738176, 190824269, 190910402, 190996573, 191082783, 191169032, 191255320, 191341647, 191428012, 191514417, 191600861, 191687344, 191773865, 191860426, 191947026, 192033665, 192120343, 192207061, 192293817, 192380613, 192467447, 192554321, 192641235, 192728187, 192815179, 192902210, 192989280, 193076389, 193163538, 193250726, 193337954, 193425220, 193512527, 193599872, 193687257,
193774682, 193862146, 193949649, 194037192, 194124775, 194212397, 194300058, 194387760, 194475500, 194563281, 194651101, 194738960, 194826859, 194914798, 195002777, 195090795, 195178853, 195266951, 195355089, 195443266, 195531483, 195619740, 195708037, 195796373, 195884750, 195973166, 196061623, 196150119, 196238655, 196327231, 196415847, 196504503, 196593200, 196681936, 196770712, 196859528, 196948385, 197037281, 197126218, 197215195, 197304212, 197393269, 197482366, 197571504, 197660681, 197749899, 197839158, 197928456, 198017795, 198107174, 198196594, 198286054, 198375554, 198465095, 198554676, 198644297, 198733959, 198823662, 198913405, 199003188, 199093012, 199182877, 199272782, 199362727, 199452714, 199542740, 199632808, 199722916, 199813065, 199903255, 199993485, 200083756, 200174067, 200264420, 200354813, 200445247, 200535722, 200626238, 200716794, 200807392, 200898030, 200988709, 201079430, 201170191, 201260993, 201351836, 201442720, 201533645, 201624611, 201715618, 201806667, 201897756, 201988887, 202080058, 202171271, 202262525, 202353820, 202445156, 202536534, 202627953, 202719413, 202810914, 202902457, 202994041, 203085666, 203177333, 203269041, 203360790, 203452581, 203544414, 203636287, 203728203, 203820159, 203912158, 204004197, 204096279, 204188401, 204280566, 204372772, 204465019, 204557309, 204649640, 204742012, 204834427, 204926883, 205019380, 205111920, 205204501,
205297124, 205389789, 205482496, 205575244, 205668035, 205760867, 205853741, 205946657, 206039615, 206132615, 206225657, 206318741, 206411867, 206505035, 206598245, 206691498, 206784792, 206878128, 206971507, 207064927, 207158390, 207251895, 207345442, 207439032, 207532663, 207626337, 207720053, 207813812, 207907613, 208001456, 208095341, 208189269, 208283240, 208377252, 208471307, 208565405, 208659545, 208753728, 208847953, 208942220, 209036531, 209130883, 209225279, 209319716, 209414197, 209508720, 209603286, 209697895, 209792546, 209887240, 209981977, 210076756, 210171578, 210266443, 210361351, 210456302, 210551295, 210646332, 210741411, 210836533, 210931699, 211026907, 211122158, 211217452, 211312789, 211408169, 211503592, 211599059, 211694568, 211790121, 211885716, 211981355, 212077037, 212172762, 212268530, 212364342, 212460197, 212556095, 212652036, 212748021, 212844049, 212940120, 213036235, 213132393, 213228594, 213324839, 213421127, 213517459, 213613835, 213710253, 213806716, 213903221, 213999771, 214096364, 214193000, 214289681, 214386404, 214483172, 214579983, 214676838, 214773737, 214870679, 214967665, 215064695, 215161768, 215258886, 215356047, 215453252, 215550501, 215647794, 215745131, 215842512, 215939937, 216037405, 216134918, 216232475, 216330076, 216427720, 216525409, 216623142, 216720919, 216818741, 216916606, 217014515, 217112469, 217210467, 217308509, 217406596,
217504727, 217602902, 217701121, 217799384, 217897692, 217996045, 218094442, 218192883, 218291368, 218389899, 218488473, 218587092, 218685756, 218784464, 218883216, 218982014, 219080855, 219179742, 219278673, 219377649, 219476669, 219575734, 219674844, 219773998, 219873198, 219972442, 220071731, 220171064, 220270443, 220369866, 220469334, 220568848, 220668406, 220768009, 220867657, 220967349, 221067087, 221166870, 221266698, 221366571, 221466490, 221566453, 221666461, 221766515, 221866613, 221966757, 222066946, 222167180, 222267460, 222367785, 222468155, 222568570, 222669031, 222769537, 222870088, 222970685, 223071327, 223172015, 223272748, 223373526, 223474350, 223575220, 223676135, 223777095, 223878101, 223979153, 224080251, 224181394, 224282582, 224383817, 224485097, 224586422, 224687794, 224789211, 224890674, 224992183, 225093737, 225195338, 225296984, 225398676, 225500414, 225602199, 225704028, 225805904, 225907826, 226009794, 226111808, 226213868, 226315974, 226418126, 226520325, 226622569, 226724859, 226827196, 226929579, 227032008, 227134483, 227237005, 227339573, 227442187, 227544848, 227647554, 227750308, 227853107, 227955953, 228058845, 228161784, 228264769, 228367801, 228470880, 228574004, 228677176, 228780394, 228883658, 228986969, 229090327, 229193731, 229297182, 229400680, 229504225, 229607816, 229711454, 229815139, 229918870, 230022648, 230126474, 230230346, 230334265,
230438231, 230542243, 230646303, 230750410, 230854564, 230958764, 231063012, 231167307, 231271649, 231376038, 231480474, 231584957, 231689487, 231794065, 231898690, 232003362, 232108081, 232212848, 232317661, 232422522, 232527431, 232632387, 232737390, 232842440, 232947538, 233052684, 233157877, 233263117, 233368405, 233473740, 233579123, 233684554, 233790032, 233895558, 234001131, 234106752, 234212421, 234318137, 234423901, 234529713, 234635572, 234741480, 234847435, 234953438, 235059489, 235165587, 235271734, 235377928, 235484171, 235590461, 235696800, 235803186, 235909620, 236016103, 236122633, 236229212, 236335838, 236442513, 236549236, 236656007, 236762827, 236869694, 236976610, 237083574, 237190586, 237297647, 237404756, 237511913, 237619119, 237726373, 237833675, 237941026, 238048425, 238155873, 238263369, 238370914, 238478508, 238586150, 238693840, 238801579, 238909367, 239017203, 239125088, 239233022, 239341005, 239449036, 239557116, 239665245, 239773422, 239881649, 239989924, 240098248, 240206621, 240315043, 240423514, 240532034, 240640603, 240749221, 240857887, 240966603, 241075368, 241184182, 241293046, 241401958, 241510919, 241619930, 241728990, 241838099, 241947257, 242056465, 242165722, 242275028, 242384384, 242493789, 242603243, 242712747, 242822300, 242931902, 243041554, 243151256, 243261007, 243370808, 243480658, 243590558, 243700507, 243810506, 243920555, 244030653,
244140801, 244250999, 244361246, 244471543, 244581890, 244692287, 244802734, 244913230, 245023777, 245134373, 245245019, 245355715, 245466461, 245577257, 245688103, 245799000, 245909946, 246020942, 246131988, 246243085, 246354231, 246465428, 246576675, 246687972, 246799320, 246910718, 247022166, 247133664, 247245212, 247356811, 247468461, 247580160, 247691911, 247803711, 247915562, 248027464, 248139416, 248251418, 248363472, 248475575, 248587730, 248699934, 248812190, 248924496, 249036853, 249149261, 249261719, 249374228, 249486788, 249599399, 249712061, 249824773, 249937536, 250050351, 250163216, 250276132, 250389099, 250502117, 250615186, 250728306, 250841477, 250954699, 251067972, 251181297, 251294672, 251408099, 251521577, 251635106, 251748687, 251862318, 251976001, 252089736, 252203521, 252317358, 252431247, 252545186, 252659178, 252773220, 252887314, 253001460, 253115657, 253229906, 253344206, 253458558, 253572962, 253687417, 253801923, 253916482, 254031092, 254145754, 254260468, 254375233, 254490050, 254604919, 254719840, 254834813, 254949838, 255064914, 255180043, 255295223, 255410456, 255525740, 255641077, 255756465, 255871906, 255987399, 256102944, 256218541, 256334190, 256449891, 256565645, 256681451, 256797309, 256913220, 257029183, 257145198, 257261265, 257377385, 257493557, 257609782, 257726059, 257842389, 257958771, 258075206, 258191693, 258308233, 258424826, 258541471,
258658168, 258774919, 258891722, 259008578, 259125486, 259242448, 259359462, 259476529, 259593649, 259710821, 259828047, 259945325, 260062657, 260180041, 260297478, 260414969, 260532512, 260650109, 260767758, 260885461, 261003216, 261121025, 261238887, 261356803, 261474771, 261592793, 261710868, 261828996, 261947178, 262065413, 262183701, 262302043, 262420438, 262538887, 262657389, 262775944, 262894553, 263013216, 263131932, 263250702, 263369525, 263488402, 263607333, 263726317, 263845355, 263964447, 264083592, 264202792, 264322045, 264441352, 264560712, 264680127, 264799596, 264919118, 265038695, 265158325, 265278009, 265397748, 265517540, 265637387, 265757287, 265877242, 265997251, 266117314, 266237431, 266357603, 266477828, 266598108, 266718443, 266838831, 266959274, 267079771, 267200323, 267320929, 267441590, 267562305, 267683074, 267803898, 267924777, 268045710, 268166697, 268287740, 268408837, 268529988, 268651194, 268772455, 268893771, 269015142, 269136567, 269258047, 269379582, 269501171, 269622816, 269744516, 269866270, 269988079, 270109944, 270231863, 270353838, 270475867, 270597952, 270720091, 270842286, 270964536, 271086841, 271209202, 271331617, 271454088, 271576614, 271699196, 271821832, 271944524, 272067272, 272190075, 272312933, 272435847, 272558816, 272681841, 272804921, 272928057, 273051248, 273174495, 273297798, 273421156, 273544570, 273668040, 273791565, 273915147
};
